package com.ruoyi.platform.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;

/**
 * 文件枚举类
 */
public enum FileType implements BaseEnum<Long> {

    IMAGE(1L,"图片"),
    DOCUMENT(2L,"文档");

    @EnumValue
    private Long code;

    private String desc;

    FileType(Long code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    @Override
    public Long getCode() {
        return this.code;
    }

    @Override
    public String desc() {
        return this.desc;
    }

    @Override
    public Long getValue() {
        return this.code;
    }

    @Override
    public String toString() {
        return desc();
    }

}
